package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.UserRolePrivileges;
import com.yunshang.shoppingmall.mapper.UserRolePrivilegesMapper;
import com.yunshang.shoppingmall.service.UserRolePrivilegesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("userRolePrivilegesService")
public class UserRolePrivilegesServiceImpl implements UserRolePrivilegesService {

    @Autowired
    UserRolePrivilegesMapper userRolePrivilegesMapper;
    @Override
    public int insert(UserRolePrivileges record) {
        return userRolePrivilegesMapper.insert(record);
    }

    @Override
    public int insertSelective(UserRolePrivileges record) {
        return userRolePrivilegesMapper.insertSelective(record);
    }

    @Override
    public List<UserRolePrivileges> selectUserRolePrivilegesByUserName(String userName) {
        return userRolePrivilegesMapper.selectUserRolePrivilegesByUserName(userName);
    }

    @Override
    public List<UserRolePrivileges> selectUserRolePrivilegesByAdminId(int adminId) {
        return userRolePrivilegesMapper.selectUserRolePrivilegesByAdminId(adminId);
    }

    @Override
    public List<UserRolePrivileges> selectUserRolePrivilegeList() {
        return userRolePrivilegesMapper.selectUserRolePrivilegeList();
    }
}
